Welcome Guest, you are in: Login
CTS Futures

Page History: MarketData Request

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2012/10/08 10:45


Subscribing and Unsubscribing to streaming data

The T4 FIX API provides (optional) subscriptions to streaming market data for all markets available in order routing. Market data is made available asyncronously and concurrently to order routing flow. The market data subscriptions are provided per FIX Session and are initiated by a Market Data Request messages (Tag 35=V). A Market Data Request is a general request for streaming of market data quotes on specific securities. Under the FIX T4 API, securities are defined by the Exchange, contracts within an exchange and markets for a specific contracts (Tag 48). Exchanges are identified by an unique Exchange ID (as carried) in Tag 207 (SecurityExchange). Contracts are characterised by the its Contract ID (as carried) in Tag 55 (Symbol). Markets are identified by an unique Market ID (as carried) by Tag 48 (SecurityID).

At any time of a FIX Session, the initiation of a market data subscriptions can be requested for a specific market by specifying a Subscription Request Type (Tag 263=1). During a FIX session, the streaming market data (for any specific security) can be also unsubscribed (Tag 263=2).

A successful Market Data Request for subscription returns one or more Market Data messages containing one or more Market Data Entries. Currently, The T4 FIX API provides market updates with the MarketSnapshot message (Tag 35=W). MarketDataSnapshots carry multiple blocks of quote data delineated by Market Data Entries. Each Market Data Entry is a bid, an offer, a trade associated with a security, the opening, closing, or settlement price of a security, the value of an index, the trading session high price, low price, or the trade volume, open interest in a security and low and high price limits. Market Data Entries usually have a price, a quantity (size) at a book level (for securities with market depth). For example, in an order book environment, requesting just the top of book will result in only two active Market Data Entries at a time – one for the best Bid and one for the best Offer.

For a full book, the Bid and Offer side may each have several Market Data Entries. A Market Data Entry could represent a completed trade in a security, the value of an index, the opening, closing, or settlement price of an instrument, the trading session high price, low price, or the volume traded or open interest in a security.

Subscription Types

The following Subscription Request Type control the initiation, termination and nature of streaming market data messages:

SnapShot + Updates: A Snapshot + Updates (Tag 263=1) causes the current state of the market to be sent, and any updates as they occur, until the client requests that the Snapshot + Updates be unsubscribed. When Snapshot + Updates is requested, updates may be full or incremental:

Full Refresh: This mode is optimized to trade off increased bandwidth for simplicity in processing and is intended for requests on only a few instruments. Each FIX Market Data message in response to the request will contain the complete data requested for one instrument. If more than just the top of book is requested, this means that both sides, and all price tiers, must be reported in that Market Data message.

Incremental Refresh: This mode is optimized for handling requests for many instruments while conserving bandwidth. Each Market Data Entry is assigned an MDEntryID unique among all other active entries, and several incremental updates of entries for different instruments can be included in one FIX Market Data message. Currently, this mode is not implemented. Therefore, all incrementals refreshes are sent as snapshot.

Unsubscribe: Unsubscribing from currently streaming market data is specified with an "Unsubscribe" Subscription Request Type (Tag 263=2).

SnapShot: A Snapshot (Tag 263=0) causes the current state of the market to be sent. Currently, this request type is equivalent to Snapshot + Updates. Note that as the data flow is driven by Market Data Snapshot messages, the complete snapshot of a market can be attained by the a receipt of a single Snapshot messages. For a complete description of the market and upon start of a subcription, the T4 FIX API also sends a snapshot message associated with non-book entries (e.g. Trade Volume, session high and low, etc.)

Data Throughput and Depth Levels

Message Dictionary

TagField NameReq'dComments
Standard HeaderYMsgType = V
262MDReqIDYMust be unique, or the ID of previous Market Data Request to disable if SubscriptionRequestType = Disable previous Snapshot + Updates Request (2).
263SubscriptionRequestTypeYSubcriptionRequestType indicates to the other party what type of response is expected. A snapshot request only asks for current information. A subscribe request asks for updates as the status changes. Unsubscribe will cancel any future update messages from the counter party.
264MarketDepthYDepth of market for Book Snapshot
265MDUpdateTypeN
266AggregatedBookNSpecifies whether or not book entries should be aggregated.
286OpenCloseSettlFlagNNot Used. Can be used to clarify a request if MDEntryType = Opening Price(4), Closing Price(5), or Settlement Price(6).
267NoMDEntryTypesYNumber of MDEntryType fields requested.
269MDEntryTypeYMust be the first field in this repeating group. This is a list of all the types of Market Data Entries that the firm requesting the Market Data is interested in receiving.
146NoRelatedSymYNumber of symbols (instruments) requested.
Standard TrailerY

Sample Message

Subscribe to streaming data from a specific market

>> 9/28/2012 3:44:48 PM   [FIXMARKETDATAREQUEST] 34=12|49=T4Test|56=test|52=20120928-20:44:48.675|262=md-9/28/2012 3:44:48 PM|263=1|264=10|265=5|267=3|269=0|269=1|269=2|146=1|55=F|48=D_F_F_20120900|167=FUT|207=D_F|
[FIXMARKETDATAREQUEST]
[MsgSeqNum] 34 = 12
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:44:48.675
[MDReqID] 262 = md-9/28/2012 3:44:48 PM
[SubscriptionRequestType] 263 = 1 (SNAPSHOT_PLUS_UPDATES)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 5 (SMART)
[NoMDEntryTypes] 267 = 3
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (TRADE)
[NoRelatedSym] 146 = 1
[Symbol] 55 = F
[SecurityID] 48 = D_F_F_20120900
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F

UnSubscribe from a currently streaming market

>> 9/28/2012 3:45:43 PM   [FIXMARKETDATAREQUEST] 34=14|49=T4Test|56=test|52=20120928-20:45:43.119|262=md-9/28/2012 3:45:43 PM|263=2|264=10|265=5|267=3|269=0|269=1|269=2|146=1|55=F|48=D_F_F_20120900|167=FUT|207=D_F|
[FIXMARKETDATAREQUEST]
[MsgSeqNum] 34 = 14
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:45:43.119
[MDReqID] 262 = md-9/28/2012 3:45:43 PM
[SubscriptionRequestType] 263 = 2 (DISABLE_PREVIOUS_SNAPSHOT_PLUS_UPDATE_REQUEST)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 5 (SMART)
[NoMDEntryTypes] 267 = 3
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (TRADE)
[NoRelatedSym] 146 = 1
[Symbol] 55 = F
[SecurityID] 48 = D_F_F_20120900
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F



FIX API Home Page.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.